﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace My.Common.EntityHelper
{
    public interface IEntityHelper
    {
        int GetKeyValue<T>(T dto);

        void SetKeyValue<T>(T dto, int keyValue);

        bool IsNewDTO<T>(T dto);

        PropertyInfo GetKeyProperty(Type dtoType);

        object GetValueOfProperty<T>(T entity, string propertyName);

        string GetKeyName(Type entityType);

        void SetValueOfProperty<T>(T entity, string propertyName, object value);

        PropertyInfo GetProperty(Type entityType, string propertyName);
    }
}
